package com.fcl.blog.mapper;

import com.fcl.blog.po.Tag;
import com.fcl.blog.po.Type;
import com.fcl.blog.po.TypeTop;
import com.fcl.blog.vo.TypeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author 付
 * @Date 2023/10/22 14:30
 * @Version 1.0
 * @description 关于分类的相关Mapper
 * @since 1.0
 */
@Mapper
public interface TypeMapper {
    List<Type> findListType();

    int insertType(@Param("type") Type type);

    Type selectByName(@Param("name") String name);
    int deleteById(@Param("id") Long id);
    int updateByType(@Param("ntype") TypeVo typeVo);

    Type selectById(@Param("id") Long id);

    List<TypeTop> typeTop();
    List<TypeTop> typeTopAll();

    Long total();
}
